package cn.tkd.client.model;

import cn.lewei.client.constants.EventCenter;

import com.extjs.gxt.ui.client.event.EventType;

public class ExpressRemoteDTO {
	public EventType loadEvent;
	public EventType selectEvent;
	public String condition;

	public static ExpressRemoteDTO get7DaysBefore() {
		ExpressRemoteDTO retval = new ExpressRemoteDTO();
		retval.loadEvent = EventCenter.LI_EXPRESS_7DAYS_BEFORE;
		retval.selectEvent = EventCenter.LI_EXPRESS_GRID_SELECT_7DAYS_BEFORE;
		retval.condition = "is_end=0  and not_exist=0 and support_status=1 and DATEDIFF(now(),updated_at)>7";
		return retval;
	}

	public static ExpressRemoteDTO getIn7Days() {
		ExpressRemoteDTO retval = new ExpressRemoteDTO();
		retval.loadEvent = EventCenter.LI_EXPRESS_IN_7DAYS;
		retval.selectEvent = EventCenter.LI_EXPRESS_GRID_SELECT_IN_7DAYS;
		retval.condition = "is_end=0  and not_exist=0 and support_status=1 and DATEDIFF(now(),updated_at)<=7";
		return retval;
	}

	public static ExpressRemoteDTO getNotSupport() {
		ExpressRemoteDTO retval = new ExpressRemoteDTO();
		retval.loadEvent = EventCenter.LI_EXPRESS_NO_SUPPORT;
		retval.selectEvent = EventCenter.LI_EXPRESS_GRID_SELECT_NO_SUPPORT;
		retval.condition = "support_status=0";
		return retval;
	}

	public static ExpressRemoteDTO getNormal() {
		ExpressRemoteDTO retval = new ExpressRemoteDTO();
		retval.loadEvent = EventCenter.LI_EXPRESS_NORMAL;
		retval.selectEvent = EventCenter.LI_EXPRESS_GRID_SELECT_NOMAL;
		retval.condition = "is_end=1";
		return retval;
	}
	public static ExpressRemoteDTO getAll() {
		ExpressRemoteDTO retval = new ExpressRemoteDTO();
		retval.loadEvent = EventCenter.LI_EXPRESS_ALL;
		retval.selectEvent = EventCenter.LI_EXPRESS_GRID_SELECT_ALL;
		retval.condition = "1=1";
		return retval;
	}
}
